package cn.submarine;

import javax.swing.*;

public class Bomb extends SeaObject {
    public Bomb(int x,int y){
        super(9,12,x,y,2);
    }

    public void move () {
        y += speed;//向右移动
    }

    @Override
    public ImageIcon getImage() {
        return Images.bomb;
    }

    public boolean isOutBounds(){
        return this.y >= World.HEIGHT;//超过WIDTH的长度即为越界
    }
}
